# po_headers.py

import time

def write_header(f):
    print >> f, r'''# Question translation for Naimath Expert System
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the Naimath package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: %s%s\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"''' % \
  (time.strftime("%Y-%m-%d %H:%M"), tz_offset())

def tz_offset():
    offset = time.altzone if time.daylight else time.timezone
    sign = -1 if offset >= 0 else 1    # backwards!
    hr, min = divmod(abs(offset) // 60, 60)
    return "%+03d%02d" % (sign * hr, min)

